/*
 * Main.fx
 *
 * Created on 27-nov-2009, 13:38:15
 */

package grecordmic;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.text.Text;
import javafx.scene.text.Font;
import javafx.scene.control.Button;
import grecordmic.MicRecorder;

/**
 * @author Gertjan2
 */
var recorder = new MicRecorder();
var recording: Boolean = false;
var text = "Start recording";
Stage {
    title: "Application title"
    width: 250
    height: 80
    scene: Scene {
        content: [
            Text {
                font : Font {
                    size : 16
                }
                x: 10
                y: 30
                content: "Application content"
            }
                        Button {
                    text: bind text;
                    action: function() {
                            if (not recording) {
                                    text="Stop Recording";
                      recording = true;
                      recorder.start();
                      } else {
                              text="Start Recording";
                       recording = false;
                      recorder.stop();
                      }
                    }
            }



        ]
    }
}